[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  FGETC

  .  Summary

  fgetc(int <fh>);

  .  Description

  The fgetc function returns the next character from the file rep-
  resented by the file handle <fh>. The file must have been opened for
  reading or from reading and writing, using the fopen function.

  .  Return Value

  Returns the character read if successful, or -1 if the end of the
  file has been reached or an error is encountered.

  .  Example

  int f;
  f = fopen("test.dat", "r");
  while (!feof(f))        // print all the characters in the file
   printc(fgetc(f));

See Also: fopen fputc ASCII table fgets fread fputs fwrite
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson